import { init } from 'snabbdom/build/package/init'
import { h } from 'snabbdom/build/package/h'

const patch = init([])

let vnode = h('div#cons',[
    h('h1#h1s','hello'),
    h('p','leaf')
])

let app = document.querySelector('#app')
let oldVnode = patch(app,vnode)

setTimeout(() => {
    // vnode = h('div#cons',[
    //     h('h1#h1s','hi'),
    //     h('p','yezi')
    // ])
    // patch(oldVnode,vnode)

    // 清楚div内容
    // patch(oldVnode,h('!'))
}, 2000);

